# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: team/kde <bribbers@disroot.org>

# The group tag is just to easily find this APKBUILD by some scripts for automation
# group=kde-applications
pkgname=kalarm
pkgver=23.08.4
pkgrel=0
pkgdesc="Personal alarm scheduler"
url="https://kontact.kde.org/"
# armhf blocked by extra-cmake-modules
# ppc64le, s390x and riscv64 blocked by qt5-qtwebengine -> akonadi
arch="all !armhf !ppc64le !s390x !riscv64"
license="GPL-2.0-or-later AND GFDL-1.2-only"
depends="kdepim-runtime"
makedepends="
	akonadi-contacts-dev
	akonadi-dev
	akonadi-mime-dev
	extra-cmake-modules
	kauth5-dev
	kcalendarcore5-dev
	kcalutils-dev
	kcmutils5-dev
	kcodecs5-dev
	kcompletion5-dev
	kconfig5-dev
	kconfigwidgets5-dev
	kdbusaddons5-dev
	kdelibs4support-dev
	kdoctools5-dev
	kglobalaccel5-dev
	kguiaddons5-dev
	kholidays5-dev
	ki18n5-dev
	kiconthemes5-dev
	kidentitymanagement-dev
	kidletime5-dev
	kimap-dev
	kio5-dev
	kjobwidgets5-dev
	kmailtransport-dev
	kmime-dev
	knotifications5-dev
	knotifyconfig5-dev
	kpimtextedit-dev
	kservice5-dev
	kwidgetsaddons5-dev
	kwindowsystem5-dev
	kxmlgui5-dev
	libkdepim-dev
	libxslt-dev
	mailcommon-dev
	phonon-dev
	pimcommon-dev
	qgpgme
	qt5-qtbase-dev
	qt5-qtx11extras-dev
	samurai
	"
_repo_url="https://invent.kde.org/pim/kalarm.git"
source="https://download.kde.org/stable/release-service/$pkgver/src/kalarm-$pkgver.tar.xz"
subpackages="$pkgname-doc $pkgname-lang"
options="!check" # Tests are broken

build() {
	cmake -B build -G Ninja\
		-DCMAKE_BUILD_TYPE=RelWithDebInfo \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

check() {
	ctest --test-dir build --output-on-failure
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
3dc9afae1cdbacc73b7e01eed32078eb43f637d86a9a035432d36138bfc54ddd2f6066812e71ed2892c833e612b1a1b95b7ad154b8b34036739397cc0f437869  kalarm-23.08.4.tar.xz
"
